package com.appbee.core.client.startup.links;

import javax.inject.Inject;

import com.appbee.core.client.shell.IShell;
import com.appbee.core.client.startup.StartupChain;
import com.appbee.core.client.startup.StartupLink;
import com.google.gwt.user.client.ui.HasWidgets.ForIsWidget;

public class ShellLink implements StartupLink
{
	private final IShell shell;

	@Inject
	public ShellLink(IShell shell)
	{
		this.shell = shell;

	}

	@Override
	public void start(ForIsWidget container, StartupChain chain)
	{
		chain.start(shell.getMainPanel());
		container.add(shell);
	}
}
